package org.omg.RTCORBA;


/**
 *	Generated from IDL definition of struct "ThreadpoolLane"
 *	@author orbas IDL compiler 
 */

public final class ThreadpoolLaneHelper
{
	private static org.omg.CORBA.TypeCode _type = null;
	public static org.omg.CORBA.TypeCode type ()
	{
		if( _type == null )
		{
			_type = org.omg.CORBA.ORB.init().create_struct_tc( org.omg.RTCORBA.ThreadpoolLaneHelper.id(),"ThreadpoolLane",new org.omg.CORBA.StructMember[]{new org.omg.CORBA.StructMember("lane_priority", org.omg.RTCORBA.PriorityHelper.type(), null),new org.omg.CORBA.StructMember("static_threads", org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(5)), null),new org.omg.CORBA.StructMember("dynamic_threads", org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(5)), null)});
		}
		return _type;
	}

	public static void insert (final org.omg.CORBA.Any any, final org.omg.RTCORBA.ThreadpoolLane s)
	{
		org.omg.CORBA.portable.OutputStream out = any.create_output_stream ();
		any.type (type ());
		write (out, s);
		any.read_value (out.create_input_stream (), type ());
	}

	public static org.omg.RTCORBA.ThreadpoolLane extract (final org.omg.CORBA.Any any)
	{
		return read(any.create_input_stream());
	}

	public static String id()
	{
		return "IDL:org/omg/RTCORBA/ThreadpoolLane:1.0";
	}
	public static org.omg.RTCORBA.ThreadpoolLane read (final org.omg.CORBA.portable.InputStream in)
	{
		org.omg.RTCORBA.ThreadpoolLane result = new org.omg.RTCORBA.ThreadpoolLane();
		result.lane_priority=in.read_short();
		result.static_threads=in.read_ulong();
		result.dynamic_threads=in.read_ulong();
		return result;
	}
	public static void write (final org.omg.CORBA.portable.OutputStream out, final org.omg.RTCORBA.ThreadpoolLane s)
	{
		out.write_short(s.lane_priority);
		out.write_ulong(s.static_threads);
		out.write_ulong(s.dynamic_threads);
	}
}
